Skip to content

Commit

Permalink
try out PWA support
Browse files Browse the repository at this point in the history
  • Loading branch information
heybereket committed May 30, 2023
1 parent 450292d commit 5378281
Show file tree
Hide file tree
Showing 9 changed files with 1,937 additions and 31 deletions.
4 changes: 2 additions & 2 deletions components/TabButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export const TabButton = (props: Props) => {
return (
<button
onClick={props.onClick}
className={`button ${
className={`${
props.active === props.tab
? "text-white"
: "text-lightGray hover:text-white"
} bg-card font-semibold px-5 py-2 rounded-lg cursor-pointer select-none active:translate-y-1 active:[box-shadow:0_0px_0_0_#19999,0_0px_0_0_#19999] active:border-b-[0px] transition-all duration-150 [box-shadow:0_10px_0_0_#19999,0_15px_0_0_#19999] border-b-[5px] border-[#2A2A2A]`}
} bg-card font-semibold px-5 py-2 rounded-lg cursor-pointer select-none active:translate-y-1 active:[box-shadow:0_0px_0_0_#19999,0_0px_0_0_#19999] active:border-b-[0px] [box-shadow:0_10px_0_0_#19999,0_15px_0_0_#19999] border-b-[5px] border-[#2A2A2A]`}
>
{props.children}
</button>
Expand Down
12 changes: 8 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
/** @type {import('next').NextConfig} */
const nextConfig = {

const withPWA = require("next-pwa")({
dest: "public",
disable: process.env.NODE_ENV !== "production",
});

module.exports = withPWA({
images: {
remotePatterns: [
{
Expand All @@ -11,6 +17,4 @@ const nextConfig = {
env: {
GOOGLE_PLACES_API_KEY: process.env.GOOGLE_PLACES_API_KEY,
},
};

module.exports = nextConfig;
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"next": "13.4.4",
"next-api-handler": "^0.4.10",
"next-auth": "^4.22.1",
"next-pwa": "^5.6.0",
"next-s3-upload": "^0.3.0",
"nsfwjs": "^2.4.2",
"postcss": "8.4.24",
Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
22 changes: 22 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Scout Machine",
"short_name": "Scout Machine",
"display": "standalone",
"orientation": "portrait",
"theme_color": "#fbbb04",
"background_color": "#141414",
"start_url": "/",
"icons": [
{
"src": "/smLogo.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/smLogo.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
1 change: 0 additions & 1 deletion public/next.svg

This file was deleted.

Binary file removed public/smBanner.png
Binary file not shown.
1 change: 0 additions & 1 deletion public/vercel.svg

This file was deleted.

1,927 changes: 1,904 additions & 23 deletions yarn.lock

Large diffs are not rendered by default.

1 comment on commit 5378281

@vercel
Copy link

@vercel vercel bot commented on 5378281 May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.