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 NameserverSearchPage from "./pages/search/NameserverSearchPage";
|
||||||
import TldPage from "./pages/info/TldPage";
|
import TldPage from "./pages/info/TldPage";
|
||||||
import StatisticsPage from "./pages/info/StatisticsPage";
|
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 UserPage from "./pages/watchdog/UserPage";
|
||||||
import React, {useCallback, useEffect, useMemo, useState} from "react";
|
import React, {useCallback, useEffect, useMemo, useState} from "react";
|
||||||
import {getUser} from "./utils/api";
|
import {getUser} from "./utils/api";
|
||||||
import FAQPage from "./pages/FAQPage";
|
|
||||||
import LoginPage, {AuthenticatedContext} from "./pages/LoginPage";
|
import LoginPage, {AuthenticatedContext} from "./pages/LoginPage";
|
||||||
import ConnectorsPage from "./pages/tracking/ConnectorsPage";
|
import ConnectorsPage from "./pages/tracking/ConnectorsPage";
|
||||||
import NotFoundPage from "./pages/NotFoundPage";
|
import NotFoundPage from "./pages/NotFoundPage";
|
||||||
|
import {ItemType, MenuItemType} from "antd/lib/menu/interface";
|
||||||
|
|
||||||
import tos from "./content/tos.md";
|
import tos from "./content/tos.md";
|
||||||
import privacy from "./content/privacy.md";
|
import privacy from "./content/privacy.md";
|
||||||
import home from './content/home.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() {
|
export default function App() {
|
||||||
const {
|
const {
|
||||||
@@ -230,12 +231,12 @@ export default function App() {
|
|||||||
<Route path="/info/tld" element={<TldPage/>}/>
|
<Route path="/info/tld" element={<TldPage/>}/>
|
||||||
<Route path="/info/stats" element={<StatisticsPage/>}/>
|
<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="/tracking/connectors" element={<ConnectorsPage/>}/>
|
||||||
|
|
||||||
<Route path="/user" element={<UserPage/>}/>
|
<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="/tos" element={<TextPage markdown={tos}/>}/>
|
||||||
<Route path="/privacy" element={<TextPage markdown={privacy}/>}/>
|
<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
|
<List
|
||||||
className="demo-loadmore-list"
|
className="demo-loadmore-list"
|
||||||
itemLayout="horizontal"
|
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) => {
|
renderItem={(e) => {
|
||||||
const jCard = vCard.fromJSON(e.entity.jCard)
|
const jCard = vCard.fromJSON(e.entity.jCard)
|
||||||
let name = ''
|
let name = ''
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ import React from "react";
|
|||||||
|
|
||||||
export default function EntitySearchPage() {
|
export default function EntitySearchPage() {
|
||||||
return <p>
|
return <p>
|
||||||
Entity Search Page
|
Not implemented
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,6 @@ import React from "react";
|
|||||||
|
|
||||||
export default function NameserverSearchPage() {
|
export default function NameserverSearchPage() {
|
||||||
return <p>
|
return <p>
|
||||||
NS Search Page
|
Not implemented
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,6 @@ import React from "react";
|
|||||||
|
|
||||||
export default function ConnectorsPage() {
|
export default function ConnectorsPage() {
|
||||||
return <p>
|
return <p>
|
||||||
Connectors Page
|
Not implemented
|
||||||
</p>
|
</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