Skip to content

Commit

Permalink
feat: add offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lozinsky committed Nov 22, 2024
1 parent d943ea2 commit 06bdc41
Show file tree
Hide file tree
Showing 5 changed files with 2,665 additions and 158 deletions.
3 changes: 2 additions & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export function Layout({ children }: { children: ReactNode }) {
<meta charSet='utf-8' />
<meta content='width=device-width, initial-scale=1' name='viewport' />
<Meta />
{import.meta.env.PROD && <script src={`${import.meta.env.BASE_URL}registerSW.js`} />}
{import.meta.env.PROD && <link href={`${import.meta.env.BASE_URL}manifest.webmanifest`} rel='manifest' />}
<Links />
</head>
<body className='h-dvh bg-base-100 text-base-content'>
Expand All @@ -75,7 +77,6 @@ export function Layout({ children }: { children: ReactNode }) {

export function links(): LinkDescriptor[] {
return [
{ href: `${import.meta.env.BASE_URL}manifest.webmanifest`, rel: 'manifest' },
{ href: `${import.meta.env.BASE_URL}favicon.ico`, rel: 'icon', sizes: '64x64' },
{ href: `${import.meta.env.BASE_URL}favicon.svg`, rel: 'icon', type: 'image/svg+xml' },
{ href: `${import.meta.env.BASE_URL}apple-touch-icon.png`, rel: 'apple-touch-icon' },
Expand Down
Loading

0 comments on commit 06bdc41

Please sign in to comment.