Mehdi commited on
Commit
d96df0e
·
verified ·
1 Parent(s): 4707ea4

Upload pages/_app.js with huggingface_hub

Browse files
Files changed (1) hide show
  1. pages/_app.js +36 -0
pages/_app.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useEffect } from 'react'
2
+ import { Toaster } from 'react-hot-toast'
3
+ import '../styles/globals.css'
4
+
5
+ function MyApp({ Component, pageProps }) {
6
+ useEffect(() => {
7
+ // Initialize RTL and Persian language
8
+ document.documentElement.dir = 'rtl'
9
+ document.documentElement.lang = 'fa'
10
+
11
+ // Load Persian font
12
+ const link = document.createElement('link')
13
+ link.href = 'https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap'
14
+ link.rel = 'stylesheet'
15
+ document.head.appendChild(link)
16
+ }, [])
17
+
18
+ return (
19
+ <>
20
+ <Component {...pageProps} />
21
+ <Toaster
22
+ position="top-right"
23
+ toastOptions={{
24
+ duration: 4000,
25
+ style: {
26
+ background: '#363636',
27
+ color: '#fff',
28
+ fontFamily: 'Vazirmatn, sans-serif',
29
+ },
30
+
31
+ />
32
+ </>
33
+ )
34
+ }
35
+
36
+ export default MyApp