Skip to content

Commit

Permalink
client: use 100svh instead of 100vh
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal committed Dec 3, 2023
1 parent 3e71282 commit c7ad773
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
5 changes: 3 additions & 2 deletions client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ a {

/* Mobile Menu */
.mobile-menu-container {
height: 100vh;
height: 100svh;
width: 100%;
top: 0;
position: fixed;
Expand Down Expand Up @@ -254,7 +254,8 @@ a {
}

.mobile-menu-close-btn {
margin: 1rem 0;
margin-top: .5rem;
/* margin: 1rem 0; */
padding: .5rem 0;
width: 100%;
color: #ff0000;
Expand Down
7 changes: 1 addition & 6 deletions client/src/components/Loader.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import React from 'react'
import useWindowHeight from '../utils/useWindowHeight'

const Loader = () => {
const { height, isReady } = useWindowHeight();

return (
<div style={{
height: `${height}px`,
opacity: isReady ? 1 : 0,
transition: 'opacity 0.5s linear'
height: '100svh'
}}>
<div className='h-full flex items-center justify-center'>
Loading...
Expand Down
6 changes: 1 addition & 5 deletions client/src/pages/Auth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ import {
useLoginStore,
useForgotStore
} from '../store/useAuthStore'
import useWindowHeight from '../utils/useWindowHeight'
import { toast } from 'sonner'
import useSocialAuth from '../utils/useSocialAuth'

// Auth page component
const Auth = () => {
const { isReady } = useWindowHeight()
const { authType, setAuthType } = useAuthStore()

useSocialAuth();
Expand All @@ -21,9 +19,7 @@ const Auth = () => {
<div
style={{
overflow: 'auto',
minHeight: '100vh',
opacity: isReady ? 1 : 0,
transition: 'opacity 0.5s linear'
minHeight: '100svh'
}}
className='flex items-center justify-center'
>
Expand Down
11 changes: 3 additions & 8 deletions client/src/pages/Certificate/VerifyCertificate.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useEffect } from 'react'
import { useParams } from 'react-router-dom'
import useWindowHeight from '../../utils/useWindowHeight'
import { useCertStore } from '../../store/useCertStore'
import Skeleton from 'react-loading-skeleton'
import 'react-loading-skeleton/dist/skeleton.css'
Expand All @@ -10,7 +9,6 @@ import GoogleCloudFacilitator from './Template/GoogleCloudFacilitator'
// Main Component
const VerifyCertificate = () => {
const { certificateID } = useParams()
const { height, isReady } = useWindowHeight()

const { certLoading, certData, fetchCertData } = useCertStore()

Expand All @@ -20,13 +18,10 @@ const VerifyCertificate = () => {

return (
<div
className='overflow-hidden md:overflow-auto pb-8'
style={{
opacity: isReady ? 1 : 0,
transition: 'opacity 0.5s linear'
}}
className='flex items-center justify-center overflow-hidden md:overflow-auto'
style={{ minHeight: '100svh' }}
>
<div className='h-full pt-[120px] flex flex-col gap-5 items-center justify-center'>
<div className='h-full md:pt-[100px] flex flex-col gap-5 items-center justify-center'>
{certLoading ? (
// Fetching Certificate
<>
Expand Down

0 comments on commit c7ad773

Please sign in to comment.