Skip to content

Commit

Permalink
del log
Browse files Browse the repository at this point in the history
  • Loading branch information
CurryYangxx committed Nov 25, 2024
1 parent f802655 commit 1b39234
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions packages/insomnia/src/ui/components/tabs/tabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const TAB_ROUTER_PATH: Record<TabEnum, string> = {
export const OrganizationTabList = ({ showActiveStatus = true, currentPage = '' }) => {
const { currentOrgTabs } = useInsomniaTabContext();
const { tabList, activeTabId } = currentOrgTabs;
console.log('activeTabId', activeTabId);
const navigate = useNavigate();

const [showAddRequestModal, setShowAddRequestModal] = useState(false);
Expand All @@ -64,9 +63,7 @@ export const OrganizationTabList = ({ showActiveStatus = true, currentPage = ''
} = useInsomniaTabContext();

const handleSelectionChange = (keys: Selection) => {
console.log('changeActiveTab');
if (keys !== 'all') {
console.log('tab change', keys);
const key = [...keys.values()]?.[0] as string;
const tab = tabList.find(tab => tab.id === key);
tab?.url && navigate(tab?.url);
Expand Down Expand Up @@ -132,7 +129,6 @@ export const OrganizationTabList = ({ showActiveStatus = true, currentPage = ''
useEffect(() => {
// sync tabList with database
const callback = async (changes: ChangeBufferEvent[]) => {
console.log('database change', changes);
for (const change of changes) {
const changeType = change[0];
const doc = change[1];
Expand Down Expand Up @@ -175,7 +171,6 @@ export const OrganizationTabList = ({ showActiveStatus = true, currentPage = ''
const tabListWrapperRef = React.useRef<HTMLDivElement>(null);

const onResize = () => {
console.log('resize');
const innerWidth = tabListInnerRef.current?.clientWidth;
const wrapperWidth = tabListWrapperRef.current?.clientWidth;
if (innerWidth && wrapperWidth && innerWidth > wrapperWidth) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export const InsomniaTabProvider: FC<PropsWithChildren> = ({ children }) => {
}, [setAppTabs]);

const addTab = useCallback((tab: BaseTab) => {
console.log('addTab');
const currentTabs = appTabsRef?.current?.[organizationId] || { tabList: [], activeTabId: '' };

updateInsomniaTabs({
Expand Down
4 changes: 0 additions & 4 deletions packages/insomnia/src/ui/hooks/tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const useInsomniaTab = ({
unitTestSuite,
}: InsomniaTabProps) => {

console.log(activeMockRoute, 'activeMockRoute');
const { appTabsRef, addTab, changeActiveTab } = useInsomniaTabContext();

const generateTabUrl = useCallback((type: TabEnum) => {
Expand Down Expand Up @@ -87,7 +86,6 @@ export const useInsomniaTab = ({
const location = useLocation();

const getTabType = (pathname: string) => {
console.log(pathname);
for (const type in TAB_ROUTER_PATH) {
const ifMatch = matchPath({
path: TAB_ROUTER_PATH[type as TabEnum],
Expand Down Expand Up @@ -261,9 +259,7 @@ export const useInsomniaTab = ({

useEffect(() => {
const type = getTabType(location.pathname);
console.log('tabType:', type);
const currentTab = getCurrentTab(type);
console.log('currentTabExist:', currentTab);
if (!currentTab && type) {
const tabInfo = packTabInfo(type);
if (tabInfo) {
Expand Down

0 comments on commit 1b39234

Please sign in to comment.