Skip to content

Commit

Permalink
Merge pull request #231 from rairprotocol/fix-seo-default
Browse files Browse the repository at this point in the history
Remove default seo values
  • Loading branch information
sarora180673 authored Sep 27, 2024
2 parents ae2011c + c4dee9f commit 4d031fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
4 changes: 1 addition & 3 deletions rair-front/src/hooks/useServerSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ const useServerSettings = () => {
link.rel = 'icon';
link.href = favicon
? favicon
: import.meta.env.VITE_TESTNET === 'true'
? HotdropsFavicon
: RairFavicon;
: RairFavicon;
document.getElementsByTagName('head')[0].appendChild(link);

return () => {
Expand Down
20 changes: 10 additions & 10 deletions rair-front/src/redux/seoSlice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LoadingDefaultFavicon } from '../images';

const hotdropsVar = import.meta.env.VITE_TESTNET;
// const hotdropsVar = import.meta.env.VITE_TESTNET;

import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
Expand Down Expand Up @@ -35,15 +35,15 @@ const initialStates: { [key: string]: SeoInformation } = {
faviconMobile: LoadingDefaultFavicon
},
rair: {
title: 'RAIR Technologies',
ogTitle: 'RAIR Technologies',
twitterTitle: 'RAIR Technologies',
title: import.meta.env.VITE_HTML_META_TITLE,
ogTitle: import.meta.env.VITE_HTML_META_TITLE,
twitterTitle: import.meta.env.VITE_HTML_META_TITLE,
contentName: 'author',
content: 'Digital Ownership Encryption',
content: import.meta.env.VITE_HTML_META_AUTHOR,
description:
'RAIR is a Blockchain-based digital rights management platform that uses NFTs to gate access to streaming content',
ogDescription: 'Encrypted, Streaming NFTs',
twitterDescription: 'Encrypted, Streaming NFTs',
import.meta.env.VITE_HTML_META_DESCRIPTION,
ogDescription: import.meta.env.VITE_HTML_META_DESCRIPTION,
twitterDescription: import.meta.env.VITE_HTML_META_DESCRIPTION,
image: `${
import.meta.env.VITE_IPFS_GATEWAY
}/QmNtfjBAPYEFxXiHmY5kcPh9huzkwquHBcn9ZJHGe7hfaW`,
Expand All @@ -53,15 +53,15 @@ const initialStates: { [key: string]: SeoInformation } = {
};

const initialState: SeoInformation = {
...initialStates[hotdropsVar ? 'hotdrops' : 'rair']
...initialStates['rair']
};

export const seoSlice = createSlice({
name: 'seo',
initialState,
reducers: {
setSEOInfo: (state, action: PayloadAction<SeoInformation | undefined>) => {
return action.payload || initialStates[hotdropsVar ? 'hotdrops' : 'rair'];
return action.payload || initialStates['rair'];
},
resetSEOInfo: (state) => {
Object.keys(state).forEach((key) => {
Expand Down

0 comments on commit 4d031fe

Please sign in to comment.