Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bring in line with latest template #1

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,3 @@ Make sure to deploy the output of `remix build`

- `build/`
- `public/build/`

### Using a Template

When you ran `npx create-remix@latest` there were a few choices for hosting. You can run that again to create a new project, then copy over your `app/` folder to the new project that's pre-configured for your target server.

```sh
cd ..
# create a new project, and pick a pre-configured host
npx create-remix@latest
cd my-new-remix-app
# remove the new project's app (not the old one!)
rm -rf app
# copy your app over
cp -R ../my-old-remix-app/app app
```
10 changes: 5 additions & 5 deletions app/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { matchSorter } from "match-sorter";
import sortBy from "sort-by";
import invariant from "tiny-invariant";

export type ContactMutation = {
type ContactMutation = {
id?: string;
first?: string;
last?: string;
Expand All @@ -30,7 +30,7 @@ const fakeContacts = {

async getAll(): Promise<ContactRecord[]> {
return Object.keys(fakeContacts.records)
.map(key => fakeContacts.records[key])
.map((key) => fakeContacts.records[key])
.sort(sortBy("-createdAt", "last"));
},

Expand Down Expand Up @@ -62,8 +62,8 @@ const fakeContacts = {

////////////////////////////////////////////////////////////////////////////////
// Handful of helper functions to be called from route loaders and actions
export async function getContacts(query: string | null) {
await new Promise(resolve => setTimeout(resolve, 500));
export async function getContacts(query?: string | null) {
await new Promise((resolve) => setTimeout(resolve, 500));
let contacts = await fakeContacts.getAll();
if (query) {
contacts = matchSorter(contacts, query, {
Expand Down Expand Up @@ -308,7 +308,7 @@ export async function deleteContact(id: string) {
last: "Jensen",
twitter: "@jenseng",
},
].forEach(contact => {
].forEach((contact) => {
fakeContacts.create({
...contact,
id: `${contact.first.toLowerCase()}-${contact.last.toLocaleLowerCase()}`,
Expand Down
22 changes: 0 additions & 22 deletions app/entry.client.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions app/entry.server.tsx

This file was deleted.

6 changes: 3 additions & 3 deletions app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {
Form,
Links,
LiveReload,
Meta,
Scripts,
ScrollRestoration,
Form,
} from "@remix-run/react";

export default function Root() {
export default function App() {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
Expand Down
Loading