Skip to content

Commit

Permalink
Merge pull request #23 from vishnuvinay89/v0.1.6
Browse files Browse the repository at this point in the history
PWA implementation and Loader in language select component
  • Loading branch information
sudeeppr1998 authored Nov 29, 2024
2 parents 666012e + 26badef commit 523132d
Show file tree
Hide file tree
Showing 7 changed files with 8,493 additions and 4,437 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/png" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>E-Wallet</title>
</head>
<body>
<div id="root"></div>
Expand Down
12,874 changes: 8,442 additions & 4,432 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"globals": "^15.11.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.15",
"vite": "^5.4.10"
"vite": "^5.4.10",
"vite-plugin-pwa": "^0.21.0"
}
}
Binary file added public/favico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
17 changes: 16 additions & 1 deletion src/components/LanguageSelect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Button,
FormControl,
InputLabel,
CircularProgress,
} from "@mui/material";
import { useNavigate, useLocation } from "react-router-dom";
import icon from "../assets/icon.svg";
Expand Down Expand Up @@ -52,7 +53,21 @@ const LanguageSelect = () => {
console.error("Login failed:", error instanceof Error ? error.message : "Unknown error");
}
};

// Show loader if Keycloak is not initialized
if (!initialized) {
return (
<Box
sx={{
minHeight: "100vh",
display: "flex",
justifyContent: "center",
alignItems: "center"
}}
>
<CircularProgress size={50}/>
</Box>
);
}
return (
<Box
sx={{
Expand Down
32 changes: 31 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa';

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(),
VitePWA({
registerType: 'autoUpdate', // Automatically updates service workers
includeAssets: ['favicon.ico'], //, 'robots.txt', 'apple-touch-icon.png'
manifest: {
name: 'E-Wallet',
short_name: 'Wallet',
description: 'E Wallet for Piramal',
theme_color: '#ffffff',
icons: [
{
src: 'favicon.ico',
sizes: '192x192',
type: 'image/png',
},
{
src: 'favicon.ico',
sizes: '512x512',
type: 'image/png',
},
{
src: 'favicon.ico',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
}),
],
})

0 comments on commit 523132d

Please sign in to comment.