mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: sort entities on Domain result
This commit is contained in:
@@ -23,19 +23,20 @@ import EntitySearchPage from "./pages/search/EntitySearchPage";
|
||||
import NameserverSearchPage from "./pages/search/NameserverSearchPage";
|
||||
import TldPage from "./pages/info/TldPage";
|
||||
import StatisticsPage from "./pages/info/StatisticsPage";
|
||||
import WatchlistsPage from "./pages/tracking/WatchlistsPage";
|
||||
import WatchlistPage from "./pages/tracking/WatchlistPage";
|
||||
import UserPage from "./pages/watchdog/UserPage";
|
||||
import React, {useCallback, useEffect, useMemo, useState} from "react";
|
||||
import {getUser} from "./utils/api";
|
||||
import FAQPage from "./pages/FAQPage";
|
||||
import LoginPage, {AuthenticatedContext} from "./pages/LoginPage";
|
||||
import ConnectorsPage from "./pages/tracking/ConnectorsPage";
|
||||
import NotFoundPage from "./pages/NotFoundPage";
|
||||
import {ItemType, MenuItemType} from "antd/lib/menu/interface";
|
||||
|
||||
import tos from "./content/tos.md";
|
||||
import privacy from "./content/privacy.md";
|
||||
import home from './content/home.md'
|
||||
import {ItemType, MenuItemType} from "antd/lib/menu/interface";
|
||||
import faq from './content/faq.md'
|
||||
|
||||
|
||||
export default function App() {
|
||||
const {
|
||||
@@ -230,12 +231,12 @@ export default function App() {
|
||||
<Route path="/info/tld" element={<TldPage/>}/>
|
||||
<Route path="/info/stats" element={<StatisticsPage/>}/>
|
||||
|
||||
<Route path="/tracking/watchlist" element={<WatchlistsPage/>}/>
|
||||
<Route path="/tracking/watchlist" element={<WatchlistPage/>}/>
|
||||
<Route path="/tracking/connectors" element={<ConnectorsPage/>}/>
|
||||
|
||||
<Route path="/user" element={<UserPage/>}/>
|
||||
|
||||
<Route path="/faq" element={<FAQPage/>}/>
|
||||
<Route path="/faq" element={<TextPage markdown={faq}/>}/>
|
||||
<Route path="/tos" element={<TextPage markdown={tos}/>}/>
|
||||
<Route path="/privacy" element={<TextPage markdown={privacy}/>}/>
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
|
||||
export default function FAQPage() {
|
||||
return <p>
|
||||
FAQ Page
|
||||
</p>
|
||||
}
|
||||
@@ -156,7 +156,10 @@ export default function DomainSearchPage() {
|
||||
<List
|
||||
className="demo-loadmore-list"
|
||||
itemLayout="horizontal"
|
||||
dataSource={domain.entities}
|
||||
dataSource={domain.entities.sort((e1, e2) => {
|
||||
const p = (r: string[]) => r.includes('registrant') ? 4 : r.includes('administrative') ? 3 : r.includes('billing') ? 2 : 1
|
||||
return p(e2.roles) - p(e1.roles)
|
||||
})}
|
||||
renderItem={(e) => {
|
||||
const jCard = vCard.fromJSON(e.entity.jCard)
|
||||
let name = ''
|
||||
|
||||
@@ -2,6 +2,6 @@ import React from "react";
|
||||
|
||||
export default function EntitySearchPage() {
|
||||
return <p>
|
||||
Entity Search Page
|
||||
Not implemented
|
||||
</p>
|
||||
}
|
||||
@@ -2,6 +2,6 @@ import React from "react";
|
||||
|
||||
export default function NameserverSearchPage() {
|
||||
return <p>
|
||||
NS Search Page
|
||||
Not implemented
|
||||
</p>
|
||||
}
|
||||
@@ -2,6 +2,6 @@ import React from "react";
|
||||
|
||||
export default function ConnectorsPage() {
|
||||
return <p>
|
||||
Connectors Page
|
||||
Not implemented
|
||||
</p>
|
||||
}
|
||||
7
assets/pages/tracking/WatchlistPage.tsx
Normal file
7
assets/pages/tracking/WatchlistPage.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import React from "react";
|
||||
|
||||
export default function WatchlistPage() {
|
||||
return <p>
|
||||
Not implemented
|
||||
</p>
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export default function WatchlistsPage() {
|
||||
return <p>
|
||||
Watchlists Page
|
||||
</p>
|
||||
}
|
||||
Reference in New Issue
Block a user