fixes
This commit is contained in:
@@ -2,5 +2,5 @@ export function useFormattedDate(_date: string) {
|
||||
const date = new Date(_date);
|
||||
const month = date.getUTCMonth().toString().padStart(2, "0");
|
||||
const monthDate = date.getUTCDate().toString().padStart(2, "0");
|
||||
return `${date.getUTCFullYear()}/${month}/${monthDate}`;
|
||||
return `${date.getUTCFullYear()}-${month}-${monthDate}`;
|
||||
}
|
||||
|
@@ -1,14 +0,0 @@
|
||||
import { useMatches } from "@remix-run/react";
|
||||
|
||||
export function useMatch() {
|
||||
const matches = useMatches();
|
||||
const { handle, ...rest } = matches[matches.length - 1];
|
||||
|
||||
if (handle == null) {
|
||||
throw new Error(`handle is missing for ${rest.pathname}`);
|
||||
}
|
||||
|
||||
return { handle, ...rest } as unknown as typeof rest & {
|
||||
handle: { to: string; text: string };
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user